package com.bjc.service.impl;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import lombok.extern.slf4j.Slf4j;

/**
 * @program: spring-cloud-alibaba
 * @description:  OrderServiceImpl3对应的BlockException处理的类
 * @author: bjc
 * @create: 2021-08-01 22:15
 */
@Slf4j
public class OrderServiceImpl3BlockHandlerClass {

    //方法要用static修饰
    public static String blockHandler(BlockException e) {
        //自定义异常处理逻辑
        log.error("触发了BlockException，内容为{}",e);
        return "BlockException";
    }
}